package cn.lhq.controller.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.lhq.bean.User;
import cn.lhq.service.UserService;
import cn.lhq.service.UserServiceImpl;

@Controller
@RequestMapping("/user")
public class FindByIdController {
	@Resource
	UserService userService;
	@RequestMapping("/findById.do")
	@ResponseBody
	public User findById(int id){
		User user = null;
		try {
			user = userService.findById(id);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return user;
	}
}
